<?php 
## include required files
/*******************************/
require_once '../model/testimonials.php';
require_once '../model/users.php';
/*******************************/
## Create Objects
/*******************************/
$testimonialObj = new Model_Testimonials();
$userObj	=	new Model_Users();
/*******************************/

if($_GET['id']!='') {
	$testimonial_id = base64_decode($_GET['id']);
	$testimonialArray = $testimonialObj->getTestimonialDetailsById($testimonial_id);	
	$smarty->assign('testimonialArray', $testimonialArray);	
	
	$userDetail= $userObj->getUserDetailsByUserId($testimonialArray['user']);
	$smarty->assign('userDetail',$userDetail);

}

## Set active class variable for left menu
$smarty->assign('activeclass', 'testimonials');
$smarty->assign('mainmenu', '2');

## Unset all the objects created which are on this page
unset($testimonialObj);

$smarty->display(TEMPLATEDIR_ADMIN. 'testimonials/testimonialdetails.tpl');
unset($smarty);
?>